<div class="notaFiscais form">
<?php echo $this->Form->create('NotaFiscai');?>
	<fieldset>
 		<legend><?php __('Editar Nota Fiscal'); ?></legend>
		<?php
		echo $this->Form->input('id_nota_fiscal');
		echo $this->Form->input('date_data', array('label'=> 'Data', 'dateFormat'=>'DMY'));
		?>
		<div class="input select">
		<label for="NotaFiscaiFornecedoreId">Fornecedor</label>
		<select name="data[NotaFiscai][fornecedore_id]" id="NotaFiscaiFornecedoreId">
			<?php foreach ($fornecedores as $fornecedor){?>
			<?php if($fornecedor['Fornecedore']['id_fornecedor'] == $this->Form->value('NotaFiscai.fornecedore_id')){?>
			<option value="<?php echo $fornecedor['Fornecedore']['id_fornecedor'];?>" selected>
			<?php }else{ ?>
			<option value="<?php echo $fornecedor['Fornecedore']['id_fornecedor'];?>">
			<?php }?>
				<?php echo $fornecedor['Fornecedore']['razao_social'];?>
			</option>
			<?php } ?>
		</select>
		</div>
		<?php 
		echo $this->Form->input('numero_nota');
		echo $this->Form->input('money_valor', array("label"=>'Valor da Nota'));
		echo $this->Form->input('money_IPI', array("label"=>"Valor IPI"));
		echo $this->Form->input('money_desconto', array('label'=>"Desconto"));
	?>
	</fieldset>
<?php echo $this->Form->end(__('Gravar', true));?>
</div>
<div class="actions">
	<?php echo $this->Html->link(__('Ver produtos cadastrados', true), array( 'controller'=> 'movimentos', 'action' => 'add', $this->Form->value('NotaFiscai.id_nota_fiscal')));?>
	<?php echo $this->Html->link(__('Voltar', true), array('action' => 'index'));?>
</div>